package com.vlada.studzad.pages;

import org.apache.tapestry5.annotations.ApplicationState;
import org.apache.tapestry5.annotations.Property;

import com.vlada.studzad.model.Privilege;
import com.vlada.studzad.model.User;

public class Student {

	@ApplicationState
	@Property
	private User user;
	private boolean userExists;	
	
	Object onActivate() {
		if (!userExists)return Index.class;
		else if(user.getPrivilege()==Privilege.STUDENT){
			return null;
		}
		return Index.class;
	}
}
